package spring.boot.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SecurityController {

	@PreAuthorize("hasAnyRole('ROLE_admin')")
	//@Secured("admin_admin1")  
	@RequestMapping("admin")
	public String admin(){
		System.out.println("当前用户成功进入admin请求");
		return "当前用户成功进入admin请求";
	}
}
